<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>layout 后台大布局 - Layui</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
</head>
<body class="layui-layout-body" style="margin-left: 15px;margin-top: 15px;">


<form class="layui-form layui-form-pane" action="/v2/UserServlet">
    <div class="layui-form-item">
        <label class="layui-form-label">登录名</label>
        <div class="layui-input-inline">
            <input type="text" name="userEmail" value="${user.userEmail}" readonly lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">头像</label>
        <div class="layui-input-inline">
            <img src="${user.userHeadImg}" height="100px" width="100">
            <input type="hidden" name="userHeadImg" value="${user.userHeadImg}">
            <button type="button" class="layui-btn layui-btn-warm">修改头像</button>
        </div>
    </div>



    <div class="layui-form-item">
        <label class="layui-form-label">角色</label>
        <div class="layui-input-block">
            <select name="userRole" lay-filter="aihao">
                <option value=""></option>
                <c:forEach var="role" items="${roleList}">
                    <c:if test="${role.roleId == user.userRole}">
                        <option value="${role.roleId}" selected >${role.roleName}</option>
                    </c:if>
                    <c:if test="${role.roleId != user.userRole}">
                        <option value="${role.roleId}"  >${role.roleName}</option>
                    </c:if>
                </c:forEach>
            </select>
        </div>
    </div>

    <div class="layui-form-item" pane="">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-block">
            <input type="radio" name="userStatus" value="0" title="启用" ${user.userStatus == 0 ?"checked":""}>
            <input type="radio" name="userStatus" value="1" title="禁用" ${user.userStatus == 1 ?"checked":""}>
        </div>
    </div>

    <div class="layui-form-item">
        <input type="hidden" name="userId" value="${user.userId}">
        <input type="hidden" name="method" value="update">
        <button class="layui-btn" lay-submit="" lay-filter="demo2">修改</button>
    </div>
</form>




<script src="/layui/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use(['element','form'], function(){
        var element = layui.element;
        var form=layui.form;

    });
</script>
</body>
</html>
